﻿using System;
using System.Windows.Forms;

namespace YJKRevitBase.WinForm.WinFormRemindSuit
{
	internal class IntReflectPropertySeter : GeneralReflectPropertySeter<int>, IAttributeSeter
	{
		private IntReflectPropertySeter()
		{
		}

		internal static IntReflectPropertySeter GetIntReflectPropertySeter()
		{
			if (IntReflectPropertySeter.m_singleTag == null)
			{
				IntReflectPropertySeter.m_singleTag = new IntReflectPropertySeter();
			}
			return IntReflectPropertySeter.m_singleTag;
		}

		public bool TrySetOneAttribute(ref System.Windows.Forms.Control inputControl, AttributeInformationBean inputAttribute)
		{
			return base.TrySetOneAttributeGeneral(ref inputControl, inputAttribute, null);
		}

		protected override int GetValueOfString(string inputStr)
		{
			return int.Parse(inputStr);
		}

		private static IntReflectPropertySeter m_singleTag;
	}
}
